<template>
  <el-descriptions v-if="info" :column="1" border>
    <el-descriptions-item label="任务标识">
      {{ info.name }}
    </el-descriptions-item>
    <el-descriptions-item label="任务描述">
      {{ info.memo }}
    </el-descriptions-item>
    <el-descriptions-item label="任务状态">
      <el-link type="primary">运行中</el-link>
    </el-descriptions-item>
    <el-descriptions-item label="上次执行">
      <show-time v-if="info.last_execution" :time="info.last_execution"></show-time>
      <el-link v-else type="danger">待运行</el-link>
    </el-descriptions-item>
    <el-descriptions-item label="任务位置">
      {{ info.callback.join('::') }}
    </el-descriptions-item>
    <el-descriptions-item label="运行规则">
      {{ info.rule }}
    </el-descriptions-item>
  </el-descriptions>
</template>
<script lang="ts">
import {defineComponent, PropType} from "vue"

export default defineComponent({
  name: "LogInfo",
  props: {
    info: Object as PropType<any>
  }
})
</script>

<style lang="scss" scoped>
::v-deep(.is-bordered-label) {
  width: 100px;
}
</style>